package control;

import Bean.Room;
import java.sql.SQLException;
import java.util.List;
import javax.swing.table.TableModel;
import model.ResultSetTableModel;
import model.RoomManagerModel;

public class RoomManagerControl
{

    RoomManagerModel rmModel = new RoomManagerModel();

    public List<Room> getRoomTypeName()
    {
        return rmModel.getRoomTypeName();
    }

    public int getPriceOf(int name)
    {
        return rmModel.getPriceOf(name);
    }

    public int getPriceOf(String type)
    {
        return rmModel.getPriceOf(type);
    }

    public boolean AddRoom(Room room)
    {
        return rmModel.AddRoom(room);
    }

    public boolean checkRoomIsExits(String name)
    {
        return false;
    }

    public TableModel getRoomType()
    {
        return rmModel.getAllRoomType();
    }

    public boolean addRoomTtype(Room room)
    {
        return rmModel.addRoomType(room);
    }

    public boolean roomTypeIsExits(String type)
    {
        return false;
    }

    public Room getRoomName(int name)
    {
        return rmModel.getRoomName(name);
    }

    public Room getInfomationOfRoom(int roomName)
    {
        return rmModel.getInfomationOfRoom(roomName);
    }

    public boolean editInformationOfRoom(Room room)
    {
        return rmModel.editInformationOfRoom(room);
    }

    public TableModel getRoomCategory()
    {
        return new RoomManagerModel().getAllRoom();
    }

    public boolean editTypeRoom(Room room)
    {
        return rmModel.editTypeRoom(room);
    }

    public Room getRoomType(String type)
    {
        return rmModel.getTyperoom(type);
    }

    public boolean deleteRoom(int name)
    {
        return rmModel.deleteRoom(name);
    }

    public ResultSetTableModel filterNameRoom(String key)
    {
        return rmModel.filterNameRoom(key);
    }

    public ResultSetTableModel filterTypeRoom(String key)
    {
        return rmModel.filterTypeRoom(key);
    }

    public ResultSetTableModel filterStateRoom(String key)
    {
        return rmModel.filterStateRoom(key);
    }

    public boolean TestInforCustomer(int name) throws SQLException
    {
        return rmModel.TestInforCustomer(name);
    }

    public boolean TestInforRoom(int name) throws SQLException
    {
        return rmModel.TestInforRoom(name);
    }
}
